home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-04 | 6.3 KB | 220 lines | [TEXT/MPS ] |
- /*
- FILENAME
- OldApp.r
-
- DESCRIPTION
- Contains resource descriptions for old-application compatibility.
-
- COPYRIGHT
- Copyright © 1995 Apple Computer, Inc.
- All rights reserved.
-
- Modification history
- 10/04/95 - David Hayward - Version 1.0.4 modified code so that
- the driver can be build under MPW,
- Metrowerks, and Symantec. In general,
- all that was required to do this was
- to add an inline-assembly jumptable
- and to store all globals off of the
- message manager instance context.
- Also made a few changes so that the
- driver can be rebuilt to support any
- resolution by changing the #defines
- kResolution and kPatStretch in
- "CommonDefines.h"
-
- 06/14/95 - Dave Hersey - Version 1.0.3 to fix a bug in
- CustomBufferingAndIO.c when creating
- high-res PICTs, and to make the size
- of buffers more flexible.
-
- 05/26/95 - Dave Hersey - Version 1.0.2 to add the new 'outp'
- desktop printer resource in NewApp.c.
-
- 05/03/95 - Dave Hersey - Version 1.0.1 to fix some minor bugs in
- CustomBufferingAndIO.c.
-
- 01/14/95 - Dave Hersey - Created from the shell of a hollowed-out
- ImageWriter driver.
- */
-
-
- #define SystemSevenOrLater 1
-
- #include "Types.r"
- #include "SysTypes.r"
- #include "GXPrintingResTypes.r"
- #include "GXPrintingResEquates.r"
- #include "CommonDefines.h"
-
-
- // This resource allows us to customize the old API's behavior - all drivers
- // should have a resource of this type
-
- resource gxCustType (gxCustID, sysheap, purgeable)
- {
- kResolution, kResolution, // our best DPI
- defaultUpDriver, // we use the default up driver
- { kPatStretch, kPatStretch }, // pattern stretch factor
- gxOptimizedTranslation + gxRasterTargetTranslation
- };
-
-
- // PrGeneral resolution resource.
-
- resource gxReslType (gxReslID, sysheap, purgeable)
- {
- rangeType,
- gxDiscreteResolution, gxDiscreteResolution,
- gxDiscreteResolution, gxDiscreteResolution,
- {
- 72, 72;
- kResolution, kResolution;
- }
- };
-
-
- // Overrides for old application messages, and where to find them in the jump table.
- // This resource must be kept in sync with the assembly
- // jump table in OldApp.c and OldApp.a
-
- resource gxOverrideType (gxDriverCompatibilityOverrideID, sysheap, purgeable)
- {
- {
- gxConvertPrintRecordTo, OldSegID, 4,
- gxConvertPrintRecordFrom, OldSegID, 8,
- gxPrValidate, OldSegID, 12
- };
- };
-
-
- // Page Setup dialog
-
- resource 'dctb' (-8192, sysheap, purgeable) {
- { /* array ColorSpec: 0 elements */
- }
- };
-
- resource 'DLOG' (-8192, sysheap, purgeable) {
- {30, 20, 174, 492},
- dBoxProc,
- invisible,
- noGoAway,
- 0x1,
- -8192,
- "Stl",
- noAutoCenter
- };
-
- resource 'DITL' (-8192, sysheap, purgeable) {
- { /* array DITLarray: 18 elements */
- /* [1] */ {8, 404, 27, 464}, Button { enabled, "OK" },
- /* [2] */ {35, 404, 54, 464}, Button { enabled, "Cancel" },
- /* [3] name frill */ {4, 4, 20, 384}, StaticText { disabled, DriverName },
- /* [4] line frill */ {20, 4, 24, 393}, UserItem { disabled },
- /* [5] */ {24, 4, 40, 60}, StaticText { disabled, "Paper:" },
- /* [6] */ {24, 68, 40, 208}, RadioButton { enabled, "¿" },
- /* [7] */ {24, 218, 40, 383}, RadioButton { enabled, "¿" },
- /* [8] */ {39, 68, 55, 208}, RadioButton { enabled, "¿" },
- /* [9] */ {39, 218, 55, 383}, RadioButton { enabled, "¿" },
- /* [10] */ {54, 68, 70, 208}, RadioButton { enabled, "¿" },
- /* [11] */ {54, 218, 70, 383}, RadioButton { enabled, "¿" },
- /* [12] */ {74, 4, 90, 88}, StaticText { disabled, "Orientation" },
- /* [13] portrait icon */ {93, 5, 125, 37}, UserItem { enabled },
- /* [14] landscape icon */ {93, 45, 125, 77}, UserItem { enabled },
- /* [15] version frill */ {4, 348, 19, 384}, UserItem { enabled },
- /* [16] default frill */ {4, 400, 24, 460}, UserItem { enabled },
- }
- };
-
- // Page Setup dialog dctl
- resource 'dctl' (-8192, sysheap, purgeable) {
- 16,
- {
- Button { 2, cancel },
- Frill { 4, line },
- PaperSizes { 0, 0, { 6, 7, 8, 9, 10, 11 } },
- Orientation { 13, 14, 0, 0 },
- Frill { 15, version },
- Frill { 16, default },
- }
- };
-
- // Version string for old dialogs
- resource 'STR ' (-8190, sysheap, purgeable) { "1.0.4" };
-
-
- // Print Dialog
-
- resource 'dctb' (-8191, sysheap, purgeable) {
- { /* array ColorSpec: 0 elements */
- }
- };
-
- resource 'DLOG' (-8191, sysheap, purgeable) {
- {50, 20, 154, 492},
- dBoxProc,
- invisible,
- noGoAway,
- 0x1,
- -8191,
- "Job",
- noAutoCenter
- };
-
- resource 'DITL' (-8191, sysheap, purgeable) {
- { /* array DITLarray: 19 elements */
- /* [1] */ {8, 404, 27, 464}, Button { enabled, "Print" },
- /* [2] */ {35, 404, 54, 464}, Button { enabled, "Cancel" },
- /* [3] name frill */ {4, 4, 20, 384}, StaticText { disabled, DriverName },
- /* [4] line frill */ {20, 5, 24, 393}, UserItem { disabled },
- /* [5] */ {44, 4, 60, 88}, StaticText { disabled, "Page Range:" },
- /* [6] */ {44, 100, 60, 188}, RadioButton { enabled, "All" },
- /* [7] */ {44, 200, 60, 260}, RadioButton { enabled, "From:" },
- /* [8] */ {44, 264, 60, 296}, EditText { disabled, "" },
- /* [9] */ {44, 304, 60, 332}, StaticText { disabled, "To:" },
- /* [10] */ {44, 332, 60, 364}, EditText { disabled, "" },
- /* [11] */ {64, 4, 80, 88}, StaticText { disabled, "Copies:" },
- /* [12] */ {64, 100, 80, 132}, EditText { disabled, "1" },
- /* [13] version frill */ {4, 348, 19, 384}, UserItem { enabled },
- /* [14] default frill */ {4, 400, 24, 460}, UserItem { enabled }
- }
- };
-
- // Print dialog dctl
- resource 'dctl' (-8191, sysheap, purgeable) {
- 14,
- {
- Button { 2, cancel },
- Frill { 4, line },
- PageRange { 6, 7, 8, 10},
- Copies { 12 },
- Frill { 13, version },
- Frill { 14, default },
- }
- };
-
-
- // Our driver's default print record for old apps. This is
- // loaded by the default implementation of gxPrintDefault.
-
- data 'PREC' (0, sysheap, purgeable) {
- $"000C" // print record version
- $"0000" // iDev
- $"0048 0048" // horizontal and vertical resolution
- $"0000 0000 02F0 0280" // rPage
- $"FFDC FFEC 02F4 0294" // rPaper
- $"8804" // wDev = 0x88, 0x04 == Portrait
-
- // Misc. values follow. We use the same as the IW.
- $"0528 03FC 0001"
- $"0000" // iDev
- $"0048 0048" // horizontal and vertical resolution
-
- // More misc. settings follow. We use the same as the IW.
- $"0000 0000 02F0 0280 0050 0020 0280 0C80 0018 0001 0101 0000"
- $"0001 270F 0001 0101 0000 0000 0000 0000 0000 0000 0000 0000"
- $"0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000"
- };
-